package languagex

import (
	"errors"
)

type Language struct {
	Code   string `json:"code"`
	NameEn string `json:"name_en"`
	NameZh string `json:"name_zh"`
}

var LanguageMap = map[string]Language{
	"af":      {Code: "af", NameEn: "Afrikaans", NameZh: "南非语"},
	"af-ZA":   {Code: "af-ZA", NameEn: "Afrikaans (South Africa)", NameZh: "南非语"},
	"ar":      {Code: "ar", NameEn: "Arabic", NameZh: "阿拉伯语"},
	"ar-AE":   {Code: "ar-AE", NameEn: "Arabic (U.A.E.)", NameZh: "阿拉伯语(阿联酋)"},
	"ar-BH":   {Code: "ar-BH", NameEn: "Arabic (Bahrain)", NameZh: "阿拉伯语(巴林)"},
	"ar-DZ":   {Code: "ar-DZ", NameEn: "Arabic (Algeria)", NameZh: "阿拉伯语(阿尔及利亚)"},
	"ar-EG":   {Code: "ar-EG", NameEn: "Arabic (Egypt)", NameZh: "阿拉伯语(埃及)"},
	"ar-IQ":   {Code: "ar-IQ", NameEn: "Arabic (Iraq)", NameZh: "阿拉伯语(伊拉克)"},
	"ar-JO":   {Code: "ar-JO", NameEn: "Arabic (Jordan)", NameZh: "阿拉伯语(约旦)"},
	"ar-KW":   {Code: "ar-KW", NameEn: "Arabic (Kuwait)", NameZh: "阿拉伯语(科威特)"},
	"ar-LB":   {Code: "ar-LB", NameEn: "Arabic (Lebanon)", NameZh: "阿拉伯语(黎巴嫩)"},
	"ar-LY":   {Code: "ar-LY", NameEn: "Arabic (Libya)", NameZh: "阿拉伯语(利比亚)"},
	"ar-MA":   {Code: "ar-MA", NameEn: "Arabic (Morocco)", NameZh: "阿拉伯语(摩洛哥)"},
	"ar-OM":   {Code: "ar-OM", NameEn: "Arabic (Oman)", NameZh: "阿拉伯语(阿曼)"},
	"ar-QA":   {Code: "ar-QA", NameEn: "Arabic (Qatar)", NameZh: "阿拉伯语(卡塔尔)"},
	"ar-SA":   {Code: "ar-SA", NameEn: "Arabic (Saudi Arabia)", NameZh: "阿拉伯语(沙特阿拉伯)"},
	"ar-SY":   {Code: "ar-SY", NameEn: "Arabic (Syria)", NameZh: "阿拉伯语(叙利亚)"},
	"ar-TN":   {Code: "ar-TN", NameEn: "Arabic (Tunisia)", NameZh: "阿拉伯语(突尼斯)"},
	"ar-YE":   {Code: "ar-YE", NameEn: "Arabic (Yemen)", NameZh: "阿拉伯语(也门)"},
	"az":      {Code: "az", NameEn: "Azeri (Latin)", NameZh: "阿塞拜疆语"},
	"az-AZ":   {Code: "az-AZ", NameEn: "Azeri (Cyrillic) (Azerbaijan)", NameZh: "阿塞拜疆语(西里尔文)"},
	"be":      {Code: "be", NameEn: "Belarusian", NameZh: "比利时语"},
	"be-BY":   {Code: "be-BY", NameEn: "Belarusian (Belarus)", NameZh: "比利时语"},
	"bg":      {Code: "bg", NameEn: "Bulgarian", NameZh: "保加利亚语"},
	"bg-BG":   {Code: "bg-BG", NameEn: "Bulgarian (Bulgaria)", NameZh: "保加利亚语"},
	"bs-BA":   {Code: "bs-BA", NameEn: "Bosnian (Bosnia and Herzegovina)", NameZh: "波斯尼亚语(拉丁文，波斯尼亚和黑塞哥维那)"},
	"ca":      {Code: "ca", NameEn: "Catalan", NameZh: "加泰隆语"},
	"ca-ES":   {Code: "ca-ES", NameEn: "Catalan (Spain)", NameZh: "加泰隆语"},
	"cs":      {Code: "cs", NameEn: "Czech", NameZh: "捷克语"},
	"cs-CZ":   {Code: "cs-CZ", NameEn: "Czech (Czech Republic)", NameZh: "捷克语"},
	"cy":      {Code: "cy", NameEn: "Welsh", NameZh: "威尔士语"},
	"cy-GB":   {Code: "cy-GB", NameEn: "Welsh (United Kingdom)", NameZh: "威尔士语"},
	"da":      {Code: "da", NameEn: "Danish", NameZh: "丹麦语"},
	"da-DK":   {Code: "da-DK", NameEn: "Danish (Denmark)", NameZh: "丹麦语"},
	"de":      {Code: "de", NameEn: "German", NameZh: "德语"},
	"de-AT":   {Code: "de-AT", NameEn: "German (Austria)", NameZh: "德语(奥地利)"},
	"de-CH":   {Code: "de-CH", NameEn: "German (Switzerland)", NameZh: "德语(瑞士)"},
	"de-DE":   {Code: "de-DE", NameEn: "German (Germany)", NameZh: "德语(德国)"},
	"de-LI":   {Code: "de-LI", NameEn: "German (Liechtenstein)", NameZh: "德语(列支敦士登)"},
	"de-LU":   {Code: "de-LU", NameEn: "German (Luxembourg)", NameZh: "德语(卢森堡)"},
	"dv":      {Code: "dv", NameEn: "Divehi", NameZh: "第维埃语"},
	"dv-MV":   {Code: "dv-MV", NameEn: "Divehi (Maldives)", NameZh: "第维埃语"},
	"el":      {Code: "el", NameEn: "Greek", NameZh: "希腊语"},
	"el-GR":   {Code: "el-GR", NameEn: "Greek (Greece)", NameZh: "希腊语"},
	"en":      {Code: "en", NameEn: "English", NameZh: "英语"},
	"en-AU":   {Code: "en-AU", NameEn: "English (Australia)", NameZh: "英语(澳大利亚)"},
	"en-BZ":   {Code: "en-BZ", NameEn: "English (Belize)", NameZh: "英语(伯利兹)"},
	"en-CA":   {Code: "en-CA", NameEn: "English (Canada)", NameZh: "英语(加拿大)"},
	"en-CB":   {Code: "en-CB", NameEn: "English (Caribbean)", NameZh: "英语(加勒比海)"},
	"en-GB":   {Code: "en-GB", NameEn: "English (United Kingdom)", NameZh: "英语(英国)"},
	"en-IE":   {Code: "en-IE", NameEn: "English (Ireland)", NameZh: "英语(爱尔兰)"},
	"en-IN":   {Code: "en-IN", NameEn: "English (Indian)", NameZh: "英语(印度)"},
	"en-JM":   {Code: "en-JM", NameEn: "English (Jamaica)", NameZh: "英语(牙买加)"},
	"en-NZ":   {Code: "en-NZ", NameEn: "English (New Zealand)", NameZh: "英语(新西兰)"},
	"en-PH":   {Code: "en-PH", NameEn: "English (Republic of the Philippines)", NameZh: "英语(菲律宾)"},
	"en-TT":   {Code: "en-TT", NameEn: "English (Trinidad and Tobago)", NameZh: "英语(特立尼达)"},
	"en-US":   {Code: "en-US", NameEn: "English (United States)", NameZh: "英语(美国)"},
	"en-ZA":   {Code: "en-ZA", NameEn: "English (South Africa)", NameZh: "英语(南非)"},
	"en-ZW":   {Code: "en-ZW", NameEn: "English (Zimbabwe)", NameZh: "英语(津巴布韦)"},
	"eo":      {Code: "eo", NameEn: "Esperanto", NameZh: "世界语"},
	"es":      {Code: "es", NameEn: "Spanish", NameZh: "西班牙语"},
	"es-AR":   {Code: "es-AR", NameEn: "Spanish (Argentina)", NameZh: "西班牙语(阿根廷)"},
	"es-BO":   {Code: "es-BO", NameEn: "Spanish (Bolivia)", NameZh: "西班牙语(玻利维亚)"},
	"es-CL":   {Code: "es-CL", NameEn: "Spanish (Chile)", NameZh: "西班牙语(智利)"},
	"es-CO":   {Code: "es-CO", NameEn: "Spanish (Colombia)", NameZh: "西班牙语(哥伦比亚)"},
	"es-CR":   {Code: "es-CR", NameEn: "Spanish (Costa Rica)", NameZh: "西班牙语(哥斯达黎加)"},
	"es-DO":   {Code: "es-DO", NameEn: "Spanish (Dominican Republic)", NameZh: "西班牙语(多米尼加共和国)"},
	"es-EC":   {Code: "es-EC", NameEn: "Spanish (Ecuador)", NameZh: "西班牙语(厄瓜多尔)"},
	"es-ES":   {Code: "es-ES", NameEn: "Spanish (Spain)", NameZh: "西班牙语(国际)"},
	"es-GT":   {Code: "es-GT", NameEn: "Spanish (Guatemala)", NameZh: "西班牙语(危地马拉)"},
	"es-HN":   {Code: "es-HN", NameEn: "Spanish (Honduras)", NameZh: "西班牙语(洪都拉斯)"},
	"es-MX":   {Code: "es-MX", NameEn: "Spanish (Mexico)", NameZh: "西班牙语(墨西哥)"},
	"es-NI":   {Code: "es-NI", NameEn: "Spanish (Nicaragua)", NameZh: "西班牙语(尼加拉瓜)"},
	"es-PA":   {Code: "es-PA", NameEn: "Spanish (Panama)", NameZh: "西班牙语(巴拿马)"},
	"es-PE":   {Code: "es-PE", NameEn: "Spanish (Peru)", NameZh: "西班牙语(秘鲁)"},
	"es-PR":   {Code: "es-PR", NameEn: "Spanish (Puerto Rico)", NameZh: "西班牙语(波多黎各(美))"},
	"es-PY":   {Code: "es-PY", NameEn: "Spanish (Paraguay)", NameZh: "西班牙语(巴拉圭)"},
	"es-SV":   {Code: "es-SV", NameEn: "Spanish (El Salvador)", NameZh: "西班牙语(萨尔瓦多)"},
	"es-UY":   {Code: "es-UY", NameEn: "Spanish (Uruguay)", NameZh: "西班牙语(乌拉圭)"},
	"es-VE":   {Code: "es-VE", NameEn: "Spanish (Venezuela)", NameZh: "西班牙语(委内瑞拉)"},
	"et":      {Code: "et", NameEn: "Estonian", NameZh: "爱沙尼亚语"},
	"et-EE":   {Code: "et-EE", NameEn: "Estonian (Estonia)", NameZh: "爱沙尼亚语"},
	"eu":      {Code: "eu", NameEn: "Basque", NameZh: "巴士克语"},
	"eu-ES":   {Code: "eu-ES", NameEn: "Basque (Spain)", NameZh: "巴士克语"},
	"fa":      {Code: "fa", NameEn: "Farsi", NameZh: "法斯语"},
	"fa-IR":   {Code: "fa-IR", NameEn: "Farsi (Iran)", NameZh: "法斯语"},
	"fi":      {Code: "fi", NameEn: "Finnish", NameZh: "芬兰语"},
	"fi-FI":   {Code: "fi-FI", NameEn: "Finnish (Finland)", NameZh: "芬兰语"},
	"fo":      {Code: "fo", NameEn: "Faroese", NameZh: "法罗语"},
	"fo-FO":   {Code: "fo-FO", NameEn: "Faroese (Faroe Islands)", NameZh: "法罗语"},
	"fr":      {Code: "fr", NameEn: "French", NameZh: "法语"},
	"fr-BE":   {Code: "fr-BE", NameEn: "French (Belgium)", NameZh: "法语(比利时)"},
	"fr-CA":   {Code: "fr-CA", NameEn: "French (Canada)", NameZh: "法语(加拿大)"},
	"fr-CH":   {Code: "fr-CH", NameEn: "French (Switzerland)", NameZh: "法语(瑞士)"},
	"fr-FR":   {Code: "fr-FR", NameEn: "French (France)", NameZh: "法语(法国)"},
	"fr-LU":   {Code: "fr-LU", NameEn: "French (Luxembourg)", NameZh: "法语(卢森堡)"},
	"fr-MC":   {Code: "fr-MC", NameEn: "French (Principality of Monaco)", NameZh: "法语(摩纳哥)"},
	"gl":      {Code: "gl", NameEn: "Galician", NameZh: "加里西亚语"},
	"gl-ES":   {Code: "gl-ES", NameEn: "Galician (Spain)", NameZh: "加里西亚语"},
	"gu":      {Code: "gu", NameEn: "Gujarati", NameZh: "古吉拉特语"},
	"gu-IN":   {Code: "gu-IN", NameEn: "Gujarati (India)", NameZh: "古吉拉特语"},
	"he":      {Code: "he", NameEn: "Hebrew", NameZh: "希伯来语"},
	"he-IL":   {Code: "he-IL", NameEn: "Hebrew (Israel)", NameZh: "希伯来语"},
	"hi":      {Code: "hi", NameEn: "Hindi", NameZh: "印地语"},
	"hi-IN":   {Code: "hi-IN", NameEn: "Hindi (India)", NameZh: "印地语"},
	"hr":      {Code: "hr", NameEn: "Croatian", NameZh: "克罗地亚语"},
	"hr-BA":   {Code: "hr-BA", NameEn: "Croatian (Bosnia and Herzegovina)", NameZh: "克罗地亚语(波斯尼亚和黑塞哥维那)"},
	"hr-HR":   {Code: "hr-HR", NameEn: "Croatian (Croatia)", NameZh: "克罗地亚语"},
	"hu":      {Code: "hu", NameEn: "Hungarian", NameZh: "匈牙利语"},
	"hu-HU":   {Code: "hu-HU", NameEn: "Hungarian (Hungary)", NameZh: "匈牙利语"},
	"hy":      {Code: "hy", NameEn: "Armenian", NameZh: "亚美尼亚语"},
	"hy-AM":   {Code: "hy-AM", NameEn: "Armenian (Armenia)", NameZh: "亚美尼亚语"},
	"id":      {Code: "id", NameEn: "Indonesian", NameZh: "印度尼西亚语"},
	"id-ID":   {Code: "id-ID", NameEn: "Indonesian (Indonesia)", NameZh: "印度尼西亚语"},
	"is":      {Code: "is", NameEn: "Icelandic", NameZh: "冰岛语"},
	"is-IS":   {Code: "is-IS", NameEn: "Icelandic (Iceland)", NameZh: "冰岛语"},
	"it":      {Code: "it", NameEn: "Italian", NameZh: "意大利语"},
	"it-CH":   {Code: "it-CH", NameEn: "Italian (Switzerland)", NameZh: "意大利语(瑞士)"},
	"it-IT":   {Code: "it-IT", NameEn: "Italian (Italy)", NameZh: "意大利语(意大利)"},
	"ja":      {Code: "ja", NameEn: "Japanese", NameZh: "日语"},
	"ja-JP":   {Code: "ja-JP", NameEn: "Japanese (Japan)", NameZh: "日语"},
	"ka":      {Code: "ka", NameEn: "Georgian", NameZh: "格鲁吉亚语"},
	"ka-GE":   {Code: "ka-GE", NameEn: "Georgian (Georgia)", NameZh: "格鲁吉亚语"},
	"kk":      {Code: "kk", NameEn: "Kazakh", NameZh: "哈萨克语"},
	"kk-KZ":   {Code: "kk-KZ", NameEn: "Kazakh (Kazakhstan)", NameZh: "哈萨克语"},
	"kn":      {Code: "kn", NameEn: "Kannada", NameZh: "卡纳拉语"},
	"kn-IN":   {Code: "kn-IN", NameEn: "Kannada (India)", NameZh: "卡纳拉语"},
	"ko":      {Code: "ko", NameEn: "Korean", NameZh: "朝鲜语"},
	"ko-KR":   {Code: "ko-KR", NameEn: "Korean (Korea)", NameZh: "朝鲜语"},
	"kok":     {Code: "kok", NameEn: "Konkani", NameZh: "孔卡尼语"},
	"kok-IN":  {Code: "kok-IN", NameEn: "Konkani (India)", NameZh: "孔卡尼语"},
	"ky":      {Code: "ky", NameEn: "Kyrgyz", NameZh: "吉尔吉斯语"},
	"ky-KG":   {Code: "ky-KG", NameEn: "Kyrgyz (Kyrgyzstan)", NameZh: "吉尔吉斯语(西里尔文)"},
	"lt":      {Code: "lt", NameEn: "Lithuanian", NameZh: "立陶宛语"},
	"lt-LT":   {Code: "lt-LT", NameEn: "Lithuanian (Lithuania)", NameZh: "立陶宛语"},
	"lv":      {Code: "lv", NameEn: "Latvian", NameZh: "拉脱维亚语"},
	"lv-LV":   {Code: "lv-LV", NameEn: "Latvian (Latvia)", NameZh: "拉脱维亚语"},
	"mi":      {Code: "mi", NameEn: "Maori", NameZh: "毛利语"},
	"mi-NZ":   {Code: "mi-NZ", NameEn: "Maori (New Zealand)", NameZh: "毛利语"},
	"mk":      {Code: "mk", NameEn: "FYRO Macedonian", NameZh: "马其顿语"},
	"mk-MK":   {Code: "mk-MK", NameEn: "FYRO Macedonian (Former Yugoslav Republic of Macedonia)", NameZh: "马其顿语(FYROM)"},
	"mn":      {Code: "mn", NameEn: "Mongolian", NameZh: "蒙古语"},
	"mn-MN":   {Code: "mn-MN", NameEn: "Mongolian (Mongolia)", NameZh: "蒙古语(西里尔文)"},
	"mr":      {Code: "mr", NameEn: "Marathi", NameZh: "马拉地语"},
	"mr-IN":   {Code: "mr-IN", NameEn: "Marathi (India)", NameZh: "马拉地语"},
	"ms":      {Code: "ms", NameEn: "Malay", NameZh: "马来语"},
	"ms-BN":   {Code: "ms-BN", NameEn: "Malay (Brunei Darussalam)", NameZh: "马来语(文莱达鲁萨兰)"},
	"ms-MY":   {Code: "ms-MY", NameEn: "Malay (Malaysia)", NameZh: "马来语(马来西亚)"},
	"mt":      {Code: "mt", NameEn: "Maltese", NameZh: "马耳他语"},
	"mt-MT":   {Code: "mt-MT", NameEn: "Maltese (Malta)", NameZh: "马耳他语"},
	"nb":      {Code: "nb", NameEn: "Norwegian (Bokm?l)", NameZh: "挪威语(伯克梅尔)"},
	"nb-NO":   {Code: "nb-NO", NameEn: "Norwegian (Bokm?l) (Norway)", NameZh: "挪威语(伯克梅尔)(挪威)"},
	"nl":      {Code: "nl", NameEn: "Dutch", NameZh: "荷兰语"},
	"nl-BE":   {Code: "nl-BE", NameEn: "Dutch (Belgium)", NameZh: "荷兰语(比利时)"},
	"nl-NL":   {Code: "nl-NL", NameEn: "Dutch (Netherlands)", NameZh: "荷兰语(荷兰)"},
	"nn-NO":   {Code: "nn-NO", NameEn: "Norwegian (Nynorsk) (Norway)", NameZh: "挪威语(尼诺斯克)(挪威)"},
	"ns":      {Code: "ns", NameEn: "Northern Sotho", NameZh: "北梭托语"},
	"ns-ZA":   {Code: "ns-ZA", NameEn: "Northern Sotho (South Africa)", NameZh: "北梭托语"},
	"pa":      {Code: "pa", NameEn: "Punjabi", NameZh: "旁遮普语"},
	"pa-IN":   {Code: "pa-IN", NameEn: "Punjabi (India)", NameZh: "旁遮普语"},
	"pl":      {Code: "pl", NameEn: "Polish", NameZh: "波兰语"},
	"pl-PL":   {Code: "pl-PL", NameEn: "Polish (Poland)", NameZh: "波兰语"},
	"pt":      {Code: "pt", NameEn: "Portuguese", NameZh: "葡萄牙语"},
	"pt-BR":   {Code: "pt-BR", NameEn: "Portuguese (Brazil)", NameZh: "葡萄牙语(巴西)"},
	"pt-PT":   {Code: "pt-PT", NameEn: "Portuguese (Portugal)", NameZh: "葡萄牙语(葡萄牙)"},
	"qu":      {Code: "qu", NameEn: "Quechua", NameZh: "克丘亚语"},
	"qu-BO":   {Code: "qu-BO", NameEn: "Quechua (Bolivia)", NameZh: "克丘亚语(玻利维亚)"},
	"qu-EC":   {Code: "qu-EC", NameEn: "Quechua (Ecuador)", NameZh: "克丘亚语(厄瓜多尔)"},
	"qu-PE":   {Code: "qu-PE", NameEn: "Quechua (Peru)", NameZh: "克丘亚语(秘鲁)"},
	"ro":      {Code: "ro", NameEn: "Romanian", NameZh: "罗马尼亚语"},
	"ro-RO":   {Code: "ro-RO", NameEn: "Romanian (Romania)", NameZh: "罗马尼亚语"},
	"ru":      {Code: "ru", NameEn: "Russian", NameZh: "俄语"},
	"ru-RU":   {Code: "ru-RU", NameEn: "Russian (Russia)", NameZh: "俄语"},
	"sa":      {Code: "sa", NameEn: "Sanskrit", NameZh: "梵文"},
	"sa-IN":   {Code: "sa-IN", NameEn: "Sanskrit (India)", NameZh: "梵文"},
	"se":      {Code: "se", NameEn: "Sami (Northern)", NameZh: "北萨摩斯语"},
	"se-FI":   {Code: "se-FI", NameEn: "Sami (Inari) (Finland)", NameZh: "伊那里萨摩斯语(芬兰)"},
	"se-NO":   {Code: "se-NO", NameEn: "Sami (Southern) (Norway)", NameZh: "南萨摩斯语(挪威)"},
	"se-SE":   {Code: "se-SE", NameEn: "Sami (Southern) (Sweden)", NameZh: "南萨摩斯语(瑞典)"},
	"sk":      {Code: "sk", NameEn: "Slovak", NameZh: "斯洛伐克语"},
	"sk-SK":   {Code: "sk-SK", NameEn: "Slovak (Slovakia)", NameZh: "斯洛伐克语"},
	"sl":      {Code: "sl", NameEn: "Slovenian", NameZh: "斯洛文尼亚语"},
	"sl-SI":   {Code: "sl-SI", NameEn: "Slovenian (Slovenia)", NameZh: "斯洛文尼亚语"},
	"sq":      {Code: "sq", NameEn: "Albanian", NameZh: "阿尔巴尼亚语"},
	"sq-AL":   {Code: "sq-AL", NameEn: "Albanian (Albania)", NameZh: "阿尔巴尼亚语"},
	"sr-BA":   {Code: "sr-BA", NameEn: "Serbian (Cyrillic) (Bosnia and Herzegovina)", NameZh: "塞尔维亚语(西里尔文，波斯尼亚和黑塞哥维那)"},
	"sr-SP":   {Code: "sr-SP", NameEn: "Serbian (Cyrillic) (Serbia and Montenegro)", NameZh: "塞尔维亚(西里尔文)"},
	"sv":      {Code: "sv", NameEn: "Swedish", NameZh: "瑞典语"},
	"sv-FI":   {Code: "sv-FI", NameEn: "Swedish (Finland)", NameZh: "瑞典语(芬兰)"},
	"sv-SE":   {Code: "sv-SE", NameEn: "Swedish (Sweden)", NameZh: "瑞典语"},
	"sw":      {Code: "sw", NameEn: "Swahili", NameZh: "斯瓦希里语"},
	"sw-KE":   {Code: "sw-KE", NameEn: "Swahili (Kenya)", NameZh: "斯瓦希里语"},
	"syr":     {Code: "syr", NameEn: "Syriac", NameZh: "叙利亚语"},
	"syr-SY":  {Code: "syr-SY", NameEn: "Syriac (Syria)", NameZh: "叙利亚语"},
	"ta":      {Code: "ta", NameEn: "Tamil", NameZh: "泰米尔语"},
	"ta-IN":   {Code: "ta-IN", NameEn: "Tamil (India)", NameZh: "泰米尔语(印度)"},
	"ta-LK":   {Code: "ta-LK", NameEn: "Tamil (Sri Lankan)", NameZh: "泰米尔语(斯里兰卡)"},
	"te":      {Code: "te", NameEn: "Telugu", NameZh: "泰卢固语"},
	"te-IN":   {Code: "te-IN", NameEn: "Telugu (India)", NameZh: "泰卢固语"},
	"th":      {Code: "th", NameEn: "Thai", NameZh: "泰语"},
	"th-TH":   {Code: "th-TH", NameEn: "Thai (Thailand)", NameZh: "泰语"},
	"tl":      {Code: "tl", NameEn: "Tagalog", NameZh: "塔加路语"},
	"tl-PH":   {Code: "tl-PH", NameEn: "Tagalog (Philippines)", NameZh: "塔加路语(菲律宾)"},
	"tn":      {Code: "tn", NameEn: "Tswana", NameZh: "茨瓦纳语"},
	"tn-ZA":   {Code: "tn-ZA", NameEn: "Tswana (South Africa)", NameZh: "茨瓦纳语"},
	"tr":      {Code: "tr", NameEn: "Turkish", NameZh: "土耳其语"},
	"tr-TR":   {Code: "tr-TR", NameEn: "Turkish (Turkey)", NameZh: "土耳其语"},
	"ts":      {Code: "ts", NameEn: "Tsonga", NameZh: "宗加语"},
	"tt":      {Code: "tt", NameEn: "Tatar", NameZh: "鞑靼语"},
	"tt-RU":   {Code: "tt-RU", NameEn: "Tatar (Russia)", NameZh: "鞑靼语"},
	"uk":      {Code: "uk", NameEn: "Ukrainian", NameZh: "乌克兰语"},
	"uk-UA":   {Code: "uk-UA", NameEn: "Ukrainian (Ukraine)", NameZh: "乌克兰语"},
	"ur":      {Code: "ur", NameEn: "Urdu", NameZh: "乌都语"},
	"ur-PK":   {Code: "ur-PK", NameEn: "Urdu (Islamic Republic of Pakistan)", NameZh: "乌都语"},
	"uz":      {Code: "uz", NameEn: "Uzbek (Latin)", NameZh: "乌兹别克语"},
	"uz-UZ":   {Code: "uz-UZ", NameEn: "Uzbek (Cyrillic) (Uzbekistan)", NameZh: "乌兹别克语(西里尔文)"},
	"vi":      {Code: "vi", NameEn: "Vietnamese", NameZh: "越南语"},
	"vi-VN":   {Code: "vi-VN", NameEn: "Vietnamese (Viet Nam)", NameZh: "越南语"},
	"xh":      {Code: "xh", NameEn: "Xhosa", NameZh: "班图语"},
	"xh-ZA":   {Code: "xh-ZA", NameEn: "Xhosa (South Africa)", NameZh: "班图语"},
	"zh":      {Code: "zh", NameEn: "Chinese", NameZh: "中文"},
	"zh-CN":   {Code: "zh-CN", NameEn: "Chinese (Mainland)", NameZh: "中文(简体)"},
	"zh-HK":   {Code: "zh-HK", NameEn: "Chinese (Hong Kong)", NameZh: "中文(香港)"},
	"zh-MO":   {Code: "zh-MO", NameEn: "Chinese (Macau)", NameZh: "中文(澳门)"},
	"zh-SG":   {Code: "zh-SG", NameEn: "Chinese (Singapore)", NameZh: "中文(新加坡)"},
	"zh-TW":   {Code: "zh-TW", NameEn: "Chinese (Taiwan)", NameZh: "中文(台湾)"},
	"zh-Hant": {Code: "zh-Hant", NameEn: "Chinese (Traditional)", NameZh: "中文(繁体)"},
	"zh-Hans": {Code: "zh-Hans", NameEn: "Chinese (Simplified)", NameZh: "中文(简体)"},
	"zu":      {Code: "zu", NameEn: "Zulu", NameZh: "祖鲁语"},
	"zu-ZA":   {Code: "zu-ZA", NameEn: "Zulu (South Africa)", NameZh: "祖鲁语"},
}

func FindLanguageByCode(code string) (Language, error) {
	if v, ok := LanguageMap[code]; ok {
		return v, nil
	}
	return LanguageMap["zh-CN"], errors.New("未找到记录")
}
